import Vue from "vue"
import Vuex from "vuex"
import * as actions from "./actions"
import * as getters from "./getters"
import state from "./state"
import mutations from "./mutations"
import VuexPersistence from "vuex-persist"

Vue.use(Vuex)
const vuexLocal = new VuexPersistence({
  storage: window.localStorage
})

export default new Vuex.Store({
  actions,
  getters,
  state,
  mutations,
  plugins: [vuexLocal.plugin]
})
